import request from '@/utils/request'

// 获取地址列表
export function getAddressList() {
  return request({
    url: '/address/list',
    method: 'get'
  })
}

// 获取地址详情
export function getAddressDetail(addressId) {
  return request({
    url: `/address/${addressId}`,
    method: 'get'
  })
}

// 添加地址
export function addAddress(data) {
  return request({
    url: '/address',
    method: 'post',
    data
  })
}

// 更新地址
export function updateAddress(data) {
  return request({
    url: `/address/${data.addressId}`,
    method: 'put',
    data
  })
}

// 删除地址
export function deleteAddress(addressId) {
  return request({
    url: `/address/${addressId}`,
    method: 'delete'
  })
} 